<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="fck" %>
<%@page import="java.util.*,model.*,util.*,control.*"%>
<!DOCTYPE html>
<html>
<head>
    <title>自适应测评系统</title>
    <meta charset="utf-8"/>
    <script  src='../../js/core.js'></script>
    <script  src='../../js/jquery-1.4.2.js'></script>
    <link type="text/css" rel='stylesheet' href="../../css/common.css"/>
    <link type="text/css" rel='stylesheet' href="../../css/houtai.css"/>
</head>
           <%
           /***********************************************************************************/
           /*
           *验证权限
           *author 胡瑾
           *data 2011-12-08
           */
			String flag = (String)session.getAttribute("flag");
			String userId = (String)session.getAttribute("userId");
			int adminId = Integer.parseInt(userId);
						
			if (flag != "admin"|| flag == null )
			{
				%>
      <script language="javascript">
				     alert("您没有管理员权限,请重新登录"); window.location.href="../../index.jsp";
				    </script>
      <%
				
			}else{
				Admin admin = new Admin();
				AdminControl ac = new AdminControl();
				admin = ac.GetAdmin(adminId);
				//out.print("<p>"+admin.getName()+"   欢迎您</p>");
				
			}
			/*********************************************************************************/
           %>
 <%
	request.setCharacterEncoding("utf-8");
	int id =Integer.parseInt(request.getParameter("id"));
 
	Problem problem = new Problem();
	ProblemControl pc = new ProblemControl();
	problem = pc.GetProblem(id);

	%>
      <form method="post" name="form" action="problem_updatechuli.jsp?id=<%=id%>">
        <table class='init' width="542" border="1" align="center">
          <tr>
            <td><div align="center">章</div></td>
            <td width="176"><div align="center">
                <input type="text" name="chapter" value="<%=problem.getChapter()  %>"/>
              </div></td>
            <td width="130"><div align="center">节</div></td>
            <td width="176"><div align="center">
                <input type="text" name="section" value="<%=problem.getSection() %>"/>
              </div></td>
          </tr>
          <tr>
            <td><div align="center">试题区分度(a)</div></td>
            <td><div align="center">
                <input type="text" name="aa" value="<%=problem.getAa()  %>"/>
              </div></td>
            <td><div align="center">试题难度(b)</div></td>
            <td><div align="center">
                <input type="text" name="bb" value="<%=problem.getBb()  %>"/>
              </div></td>
          </tr>
          <tr>
            <td><div align="center">猜测系数(c)</div></td>
            <td><div align="center">
                <input type="text" name="cc" value="<%=problem.getCc()  %>"/>
              </div></td>
            <td><div align="center">适用的能力值</div></td>
            <td><div align="center">
                <input type="text" name="abilityRange" value="<%=problem.getAbilityRange()  %>"/>
              </div></td>
          </tr>
          <tr>
            <td width="143"><div align="center">题干内容</div></td>
            <td colspan="3" align="center"><fck:editor id="testfck" basePath="/SAT/fckeditor/" height="150"
                width="542" skinPath="/SAT/fckeditor/editor/skins/office2003/"
                toolbarSet="Basic"
                imageBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
                linkBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
                flashBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
                imageUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Image"
                linkUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=File"
                flashUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Flash"> <%=problem.getContent() %> </fck:editor>            </td>
          </tr>
          <tr>
            <td><div align="center">选项A</div></td>
            <td><fck:editor id="A" basePath="/SAT/fckeditor/" height="80"
                width="250" skinPath="/SAT/fckeditor/editor/skins/office2003/"
                toolbarSet="Basic"
                imageBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
                linkBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
                flashBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
                imageUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Image"
                linkUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=File"
                flashUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Flash"> <%=problem.getA() %> </fck:editor>            </td>
            <td><div align="center">选项B</div></td>
            <td><fck:editor id="B" basePath="/SAT/fckeditor/" height="80"
                width="250" skinPath="/SAT/fckeditor/editor/skins/office2003/"
                toolbarSet="Basic"
                imageBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
                linkBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
                flashBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
                imageUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Image"
                linkUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=File"
                flashUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Flash"> <%=problem.getB() %> </fck:editor>            </td>
          </tr>
          <tr>
            <td><div align="center">选项C</div></td>
            <td><fck:editor id="C" basePath="/SAT/fckeditor/" height="80"
                width="250" skinPath="/SAT/fckeditor/editor/skins/office2003/"
                toolbarSet="Basic"
                imageBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
                linkBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
                flashBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
                imageUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Image"
                linkUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=File"
                flashUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Flash"> <%=problem.getC() %> </fck:editor>            </td>
            <td><div align="center">选项D</div></td>
            <td><fck:editor id="D" basePath="/SAT/fckeditor/" height="80"
                width="250" skinPath="/SAT/fckeditor/editor/skins/office2003/"
                toolbarSet="Basic"
                imageBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
                linkBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
                flashBrowserURL="/SAT/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
                imageUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Image"
                linkUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=File"
                flashUploadURL="/SAT/fckeditor/editor/filemanager/upload/simpleuploader?Type=Flash"> <%=problem.getD() %> </fck:editor>            </td>
          </tr>
          <tr>
            <td><div align="center"></div></td>
            <td><div align="center"></div></td>
            <td><div align="center"></div></td>
            <td><div align="center"></div></td>
          </tr>
          <tr>
            <td><div align="center">正确选项</div></td>
            <td><div align="center">
                <input type="text" name="correct" value="<%=problem.getCorrect()  %>"/>
              </div></td>
            <td><div align="center">分数</div></td>
            <td><div align="center">
                <input type="text" name="mark" value="<%=problem.getMark()  %>"/>
              </div></td>
          </tr>
          <tr>
            <td><div align="center">是否包含图片</div></td>
            <td><div align="center">
                <input type="text" name="flag_pic" value="<%=problem.getFlag_pic()  %>"/>
              </div></td>
            <td><div align="center">是否包含视频或声音</div></td>
            <td><div align="center">
                <input type="text" name="flag_med" value="<%=problem.getFlag_med()  %>"/>
              </div></td>
          </tr>
          <tr>
            <td><div align="center">锁题标识</div></td>
            <td><div align="center">
                <input type="text" name="flag" value="<%=problem.getFlag()  %>"/>
              </div></td>
            <td><div align="center">曝光控制参数</div></td>
            <td><div align="center">
                <input type="text" name="alt1" value="<%=problem.getAlt1()  %>"/>
              </div></td>
          </tr>
          <tr>
            <td><div align="center">出题人</div></td>
            <td><div align="center">
                <input type="text" name="author" value="<%=problem.getAuthor()  %>"/>
              </div></td>
            <td><div align="center">参数最后调整时间</div></td>
            <td><div align="center">
                <input type="text" name="lastTime"  onClick="WdatePicker()" value="<%=problem.getSetTime()  %>"/>
              </div></td>
          </tr>
        </table>
        <div align="center">
          <input type="submit" value="确定">
          &nbsp;
          <input type="reset" value="取消">
          </div>
      </form>
        </div>
  </form>
  </body>
</html>